//
//  JXPopMenu.h
//  JiaoX
//
//  Created by yinqy on 15/2/27.
//  Copyright (c) 2015年 北京娇羞科技有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef enum {
    JXPopMenuArrowPositionLeft = 1,
    JXPopMenuArrowPositionRight = 2,
    JXPopMenuArrowPositionCenter = 3
} JXPopMenuArrowPosition;

@class JXPopMenu;
@protocol JXPopMenuDelegate <NSObject>

@optional
- (void)popMenuDidDismissed:(JXPopMenu *)popMenu;
@end
@interface JXPopMenu : UIView
@property (nonatomic, weak) id<JXPopMenuDelegate> delegate;
@property (nonatomic, assign, getter = isDimBackground) BOOL dimBackground;
@property (nonatomic, assign) JXPopMenuArrowPosition arrowPosition;

/**
 *  初始化方法
 */
- (instancetype)initWithContentView:(UIView *)contentView;
+ (instancetype)popMenuWithContentView:(UIView *)contentView;

/**
 *  设置菜单的背景图片
 */
- (void)setBackground:(UIImage *)background;

/**
 *  显示菜单
 */
- (void)showInRect:(CGRect)rect;

/**
 *  关闭菜单
 */
- (void)dismiss;

/**
 *  更新view
 */
- (void)updateView;

@end
